package com.magicodex.bookkeeping.biz.common.util;

import java.util.Collection;

/**
 * <p>
 * 集合工具类。
 * </p>
 *
 * @author mh.z
 */
public class CollectionUtil {

    /**
     * 判断集合是否为空
     *
     * @param collection
     * @return
     */
    public static boolean isEmpty(Collection<?> collection) {
        return (collection == null || collection.isEmpty());
    }

    /**
     * 判断集合是否不为空
     *
     * @param collection
     * @return
     */
    public static boolean isNotEmpty(Collection<?> collection) {
        return (collection != null && collection.size() > 0);
    }

}
